efform_onload = function ()
{
	$('#flag').val()==6;
};  

button_query_onclick = function (){
	efgrid.submitInqu( "ef_grid_result", "ZM","ZMCG97","query");
}

button_insert_onclick = function (){
	if (isSelected("ef_grid_result") == 0)return; 
	efgrid.submitForm( "ef_grid_result", "ZM","ZMCG97","insert",true); 
}

button_update_onclick = function (){  
	if (isSelected("ef_grid_result") == 0)return; 
	efgrid.submitForm( "ef_grid_result", "ZM","ZMCG97","update",true);
}

button_delete_onclick = function() {
	if (isSelected("ef_grid_result") == 0)return;
	EFConfirm('你确认要删除吗?', '确认框',function(r) {
				if (r)efgrid.submitForm("ef_grid_result", "ZM", "ZMCG97","delete", true);
	});
}

//efgrid_afterAddNewRow = function(grid_id){ 
//	var grid = efgrid.getGridObject(grid_id);  
//	var rows = grid.getCheckedRows(); 
//	if(grid_id=="ef_grid_result")
//	{
//		for(var i = 0 ; i < rows.length;i++){
//			grid.setCellValue(rows[i],8,"掘进计划",TYPE_DATA); 
//
//		}
//	}
//}